import Http from "../Http";
import {stringify} from "qs";

// 服务包 增删改查
export default {
    /**
     * @param data {{limit:number,index:number,filter:string}}
     * @returns {AxiosPromise}
     */
    lists(data = {}) {
        return Http.get("/crs/car/server", data)
    },
    info(id) {
        return Http.delete(`/crs/car/server/${id}`)
    },
    destroy(id) {
        return Http.delete(`/crs/car/server/${id}`)
    },
    create(data) {
        return Http.post("/crs/car/server", stringify(data))
    },
    update(data) {
        return Http.put("/crs/car/server", stringify(data))
    }
}
